package com.isoft.src.main.java.service;

import com.isoft.src.main.java.model.Order;

import java.util.HashMap;
import java.util.Map;

public class OrderService {
    private Map<String, Order> orderDatabase = new HashMap<>();

    public void placeOrder(Order order) {
        orderDatabase.put(order.getOrderId(), order);
    }

    public Order getOrder(String orderId) {
        return orderDatabase.get(orderId);
    }

    public Map<String, Order> getAllOrders() {
        return orderDatabase;
    }

    // Additional methods for generating reports, etc. can be added here
}